package com.techie.mdm.appbar.showcase.binding;

import org.springframework.binding.form.FormModel;
import org.springframework.binding.value.ValueModel;
import org.springframework.richclient.form.binding.swing.TextComponentBinding;

import javax.swing.text.JTextComponent;

public class OverrideTextComponentBinding extends TextComponentBinding
{
    private ValueModel  modelOverride;

    public OverrideTextComponentBinding(JTextComponent textComponent, FormModel formModel, String formPropertyPath,
                                        ValueModel modelOverride)
    {
        super(textComponent, formModel, formPropertyPath);
        this.modelOverride = modelOverride;
    }

    @Override
    protected ValueModel getValueModel()
    {
        return modelOverride;
    }
}
